<template>
    <div class="project">
        <el-form v-model="regist" style="width:400px; padding-top:80px;" ref="numberValidateForm" label-width="100px" class="demo-ruleForm">
        <el-form-item
            label="用户名"
            prop="name"
        >
            <el-input  v-model="regist.name" autocomplete="off"> </el-input>
        </el-form-item>
        <el-form-item
            label="学校"
            prop="school"
        > <el-input type="text" v-model="regist.school" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
            label="地址"
            prop="address"
        > <el-input type="text" v-model="regist.address" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
            label="密码"
            prop="pass"
        > <el-input type="password" v-model="regist.pass" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="jump()">登陆</el-button>
        </el-form-item>
        </el-form>
    </div>
</template>
<script>

import {  mapMutations } from 'vuex'
export default ({
    name:'project',
    data(){
        return{
            regist:{},
        }
    },
    methods:{
        ...mapMutations(['loginUs']),
        jump(){
            this.loginUs(this.regist);
            this.regist = {}
            this.$router.push({
            path:'/msg',
            })
           }
    }
})
</script>
<style lang="scss" scoped>
    .project{
        width: 600px;
        height: 400px;
        box-shadow: 0 0 4px #888787;
        margin: 20px auto;
        .demo-ruleForm{
            margin-left: 60px;
        }
    }
</style>
